package com.koron.operation.dispatch.feign;

import com.koron.bean.base.Response;
import com.koron.common.core.feignConfig.FeignFallbackFactory;
import com.koron.operation.dispatch.bean.TabPmpMonitor;
import com.koron.operation.dispatch.bean.dto.UnitSynDto;
import com.koron.operation.startlog.bean.RealTimeBean;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;


@FeignClient(value = "eam-service-monitor", fallbackFactory = FeignFallbackFactory.class)
public interface MonitorFeign {


    /**
     * 获取单个泵站机组开停机记录
     * @param db
     * @param dpname
     * @param lastsyntime
     * @return
     */
    @GetMapping(value = "/unitlog/getSingleUnitStartLog")
    Response<List<TabPmpMonitor>> getSingleUnitStartLog(@RequestParam("db") String db, @RequestParam("dpname") String dpname, @RequestParam("lastsyntime") String lastsyntime);

    /**
     * 获取多个泵站机组开停机记录
     * @param unitsyndto
     * @return
     */
    @PostMapping(value = "/unitlog/getUnitStartLog")
    Response<List<UnitSynDto>> getUnitStartLog(@RequestBody List<UnitSynDto> unitsyndto);

    /**
     * 实时数据查询
     * @param mark
     * @param equipmentId
     * @param columnName
     * @return
     */
    @GetMapping("/common/getRealTime")
    Response<List<RealTimeBean>> getRealTime(@RequestParam("mark") String mark,@RequestParam("equipmentId") String equipmentId, @RequestParam(value = "columnName", required = false) String columnName);

}
